home *** CD-ROM | disk | FTP | other *** search
- Path: solon.com!not-for-mail
- From: seebs@solutions.solon.com (Peter Seebach)
- Newsgroups: comp.lang.c
- Subject: Re: Help! Can't read input from keyboard!
- Date: 2 Apr 1996 21:14:38 -0600
- Organization: Usenet Fact Police (Undercover)
- Message-ID: <4jsqeu$rur@solutions.solon.com>
- References: <4jq0ts$5mh@taniemarie.solon.com> <4jsmb5$mlo@newsie.dmc.com>
- NNTP-Posting-Host: solutions.solon.com
-
- In article <4jsmb5$mlo@newsie.dmc.com>, <prozac@cape.com> wrote:
- >In article <4jq0ts$5mh@taniemarie.solon.com>, seebs@taniemarie.solon.com
- >asks something like a trick question or are the more than one Peter Seebachs
-
- It's an April Fools' joke.
-
- >> #include <stdio.h>
- >> int main(void) {
- >> int i = 0;
- >> (void) sscanf, "3", "%d", i;
- >> (void) printf, "%d", i;
- >> return 0;
- >> }
-
- >>Can anyone help? I have cast sscanf() to void to prevent it from erroring.
-
- >This is a "meaningless use of expression". Without the parens,
- >the function identifier is a pointer not a call.
-
- Ding ding ding ding ding!
-
- >They are like nul statements:
-
- > ;
- > 0;
- > 1,2;
- >etc.
-
- >Use parens for normal function calls.
-
- Very good! At least *someone* could tell. I'm quite happy; I was not
- pleased that so many people misunderstood the question.
-
- I mean, if you compile the code, it's obvious that it's compilable, maybe
- even legal. If someone shows you apparently legal code which doesn't work,
- *study* it before you post a correction, folks. I'm sick of seeing blatantly
- wrong answers.
-
- Prozac here wins the prize for correctly noting what's going on.
-
- -s
- --
- Peter Seebach - seebs@solon.com - Copyright 1996 Peter Seebach.
- C/Unix wizard -- C/Unix questions? Send mail for help. No, really!
- FUCK the communications decency act. Goddamned government. [literally.]
- The *other* C FAQ - http://www.solon.com/~seebs/c/c-iaq.html
-